#pragma once

#include <engine.core/math.hpp>

#include "exports.hpp"
#include "ActorKinematics.hpp"




struct ENGINE_PHYSICS_API ActorDesc
{
	//
	// Physical properties of the actor
	//

	float_t     mass;
	vector3     position;
	vector3     velocity;

	matrix3x3   rotation;
	//vector3     angularVelocity;


	//
	// Geometric bounding volumes
	//

	#pragma warning (push)
	#pragma warning (disable:4251)
	std::vector< sphere >   spheres;
	std::vector< obb >      boxes;
	#pragma warning (pop)



	/**
	 * Add a sphere-shape to this actor description.
	 */
	void addShape(const sphere& sphere_);

	/**
	 * Add a box shape to this actor description.
	 */
	void addShape(const obb& obb_);



	/**
	 * The ActorDesc is able to create a bounding sphere that includes
	 * all shapes. For now it is centered on the actor (so it's not the optimal sphere.
	 * But this may change in the future.
	 */
	sphere   boundingSphere() const;

	/**
	 * The ActorDesc is responsible for creating the ActorKinematics structure
	 * from a "finished" actor description.
	 *
	 * @warning  calling this function is expensive and should only be called when absolutely required
	 */
	ActorKinematics kinematics() const;
};
///////////////////////////////////////////////////////////////////////////////////////////////////
